#include <openssl/rand.h>
#include <error.cpp>
using namespace std;

void seed_random(unsigned char* seed)
{
    RAND_seed(seed, sizeof seed);
}

void generate_random(unsigned char* random,int length){
    if( RAND_bytes(random, length) <=0 )
    {
        throw get_errors();
        
    }
}